package com.yang.demo.service;

import com.yang.demo.entity.Employee;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yang.demo.entity.RespBean;
import com.yang.demo.entity.RespPageBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaoyang
 * @since 2022-07-09
 */
public interface IEmployeeService extends IService<Employee> {

    /**
     * 获取所有员工的工资账套(分页查询)
     * @param currentPage
     * @param size
     * @return
     */
    RespPageBean getEmployeeWithSalary(Integer currentPage,Integer size);

    /**
     * 分页查询员工
     * @param currentPage
     * @param size
     * @param employee
     * @param beginDateScope
     * @return
     */
    RespPageBean getEmployeesByPage(Integer currentPage,
                                    Integer size,
                                    Employee employee,
                                    LocalDate[] beginDateScope);

    /**
     * 获取最大的工号di
     * @return
     */
    RespBean getMaxWorkId();

    /**
     * 添加员工
     * @param employee
     * @return
     */
    RespBean addWork(Employee employee);


    /**
     * 更新员工(考虑合同期限)
     * @param employee
     * @return
     */
    RespBean updateWorker(Employee employee);

    /**
     * 导出员工数据
     * @param id
     */
    List<Employee> exportEmployee(Integer id);

}